#TODO: This Makefile doesn't work properly if you update a header file.
#      Use make clean followed by make.
#TODO: Get incremental compiling to work with OpenMP
#      (Note that you must COMPILE with -fopenmp, not link)
all:
	g++ -g Color.cpp Light.cpp Plane.cpp Ray.cpp Scene.cpp Sphere.cpp Vector.cpp Triangle.cpp Texture.cpp invert.cpp ppm.cpp raytrace.cpp -o raytracer
	g++ -g -fopenmp Color.cpp Light.cpp Plane.cpp Ray.cpp Scene.cpp Sphere.cpp Triangle.cpp Vector.cpp Texture.cpp invert.cpp ppm.cpp raytrace.cpp -o speeedtracer

test: Color.o Light.o Plane.o Ray.o Scene.o Sphere.o Vector.o Texture.o invert.o ppm.o raytrace.o 
	g++ -g Color.cpp Light.cpp Plane.cpp Ray.cpp Scene.cpp Sphere.cpp Vector.cpp Texture.cpp Triangle.cpp invert.cpp ppm.cpp raytrace.cpp -o raytracer && \
	g++ -g -fopenmp Color.cpp Light.cpp Plane.cpp Ray.cpp Scene.cpp Sphere.cpp Vector.cpp Texture.cpp Triangle.cpp invert.cpp ppm.cpp raytrace.cpp -o speeedtracer && \
    ./tester.sh
	
clean:
	rm -f speeedtracer raytracer *.o

